<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        ul,li{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        li{
            float: left;
            position: relative;
            padding: 20px;
        }
        li .bg{
            position: absolute;
            top: 30px;
            left: 0px;
            width: 20px;
            height: 0px;
            background: #f0f;
            transition: all 0.3s;
        }
        li:hover .bg{
            height: 50px;
        }

    </style>
</head>
<body>
<ul>
    <li>标题1
    <span class="bg"></span>
    </li>
    <li>标题2<span class="bg"></span></li>
    <li>标题3<span class="bg"></span></li>
    <li>标题4<span class="bg"></span></li>
    <li>标题5<span class="bg"></span></li>
    <li>标题6<span class="bg"></span></li>
    <li>标题7<span class="bg"></span></li>
</ul>
</body>
</html>